 <?php 
 	include '../init.php';

 	$sql ='select `id`, `name`,`price`, `stock`,`sales`,`desc`,`up`, `hot`
 		   from goods 
 		   where id='.$_GET['id'];
 	// echo $sql;exit;

   $result = query($sql);
   $edit_list = $result[0];
   // var_dump($edit_list);exit;

  ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8">
 	<title>Document</title>
 </head>
 <body>
 	<fieldset>
		<legend>编辑商品</legend>

		<form action="action.php?bz=edit" method='post' enctype='multipart/form-data'>

		<input type="hidden" name='id' value='<?=$edit_list['id']?>'>
			
			<p>商品名: <input type="text" name='name' value='<?= $edit_list['name']?>'></p>
			<p>商品价格: <input type="text" name='price'  value='<?= $edit_list['price']?>'></p>
			<p>库存: <input type="text" name='stock' value='<?= $edit_list['stock']?>'></p>
			<p>描述:
				<textarea name="desc" value='<?= $edit_list['desc']?>'  ></textarea>
			</p>
			<p>是否上架:
				<lable><input type="radio" name='up' value=1 checked >Yes</lable>
				<lable><input type="radio" name='up' value=2>No</lable>
			</p>
			<p>是否热销:
				<lable><input type="radio" name='hot' value=1 checked >Yes</lable>
				<lable><input type="radio" name='hot' value=2>No</lable>
			<p><input type="submit" value='修改'></p>
		</form>
	</fieldset>		
 </body>
 </html>